% V20210224 - 9.22 GW_ADD_COLORPICKER INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("Colorpicker Example") % Add title to page. GW_ADD_TITLEBAR(p,Title$) % Add descriptive text. GW_ADD_TEXT(p, "This is an example of the COLORPICKER control:") % Now add the colorpicker control. CP = GW_ADD_COLORPICKER(p, "Pick a color", "#00ff00") % Add a button to get the color code. GW_ADD_BUTTON(p, "Get the color", "Get") % Add textbox to show color code. TB = GW_ADD_TEXTBOX(p, "") % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Example feedback. POPUP r$ % Was the button pressed? IF r$ = "Get" then ~ GW_MODIFY(TB, "text", GW_GET_VALUE$(CP)) % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of Colorpicker example."